#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main111()
{
	int x = 0;
	scanf("%d", &x);
	int sum = 0;
	for (int i = 1; i <= x; i++)
	{
		int tmp = 1;
		for (int j = 1; j <= i; j++)
		{
			tmp *= j;
		}
		sum += tmp;
	}
	printf("%d\n", sum);
	//printf("%d\n", tmp);
	{
		int a = 100;
		printf("%d\n", a);
	}
	//printf("%d\n", a);

	return 0;
}